<!DOCTYPE html>
<html lang="en">
<head>
    <title>公司介绍设置</title>
    <style type="text/css">
        .radius{
            border-radius:5px!important;
        }
    </style>
</head>
<body>
<div class="page-container">
    <div class="page-content">
        <div class="container">
            <div class="page-bar" style="background-color: #fff;margin-bottom: 5px;margin-top: 10px;">
                <ul class="page-breadcrumb">
                    <li>
                        <i class="glyphicon glyphicon-cog"></i>
                        <span>请填写以下信息：</span>
                    </li>
                </ul>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet  radius light bordered">
                        <div class="portlet-body form">
                            <form action="javascript:;" id="updateForm" class="form-horizontal">
                                <div class="row">
                                    <div class="form-body">
                                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
                                            <div class="form-group">
                                                <label class="col-md-3 control-label">公司名称：</label>
                                                <div class="col-md-8">
                                                    <input class="form-control" type="text" id="companyName" name="companyName"value="${companyInfo.companyName}">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="form-body">
                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label">公司概况：</label>
                                                <div class="col-md-8">
                                                    <textarea class="form-control" rows="3" id="infoA" name="infoA">${companyInfo.infoA}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="form-body">
                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label">主要经营业务：</label>
                                                <div class="col-md-8">
                                                    <textarea class="form-control" rows="3" id="infoB" name="infoB" >${companyInfo.infoB}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="form-body">
                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label">发展状况：</label>
                                                <div class="col-md-8">
                                                    <textarea class="form-control" rows="3" id="infoC" name="infoC">${companyInfo.infoC}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="form-body">
                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label">公司前景：</label>
                                                <div class="col-md-8">
                                                    <textarea class="form-control" rows="3" id="infoD" name="infoD">${companyInfo.infoD}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="text-center">
                                        <button type="button" class="btn green" onclick="updCompanyInfo()">提交
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function updCompanyInfo() {
        if ($("#companyName").val()==''||$("#companyName").val()==null){
            layer.msg("请输入公司名称！");return;
        }
        if ($("#infoA").val()==''||$("#infoA").val()==null){
            layer.msg("请输入公司概况！");return;
        }
        if ($("#infoB").val()==''||$("#infoB").val()==null){
            layer.msg("请输入主要经营业务！");return;
        }
        if ($("#infoC").val()==''||$("#infoC").val()==null){
            layer.msg("请输入发展状况！");return;
        }
        if ($("#infoD").val()==''||$("#infoD").val()==null){
            layer.msg("请输入公司前景！");return;
        }
        $.ajax({
            type: "POST",
            data: $('#updateForm').serializeArray(),
            url: rootPath + "/companyInfo/ajax/updCompanyInfo",
            dataType: 'json',
            success: function (data, textStatus) {
                if (data.code == '0000') {
                    parent.commonJs.alertMsg(data.msg, function () {
                        location.reload();
                    });
                } else {
                    commonJs.alertMsg(data.msg, function () {
                        closeMode();
                    });
                }
            }
        });
    }
</script>
</body>
</html>